package com.zzw.spring.aop.vo;

import com.zzw.spring.aop.service.BenaSelfProxyAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

public class Waiter2 implements BenaSelfProxyAware {

	private Waiter2 waiter2;

	private Logger logger = LoggerFactory.getLogger(getClass());

	public void greetTo(String name){
		logger.info("Waiter greet to" + name + "...");
		waiter2.serveTo(name);
	}

	public void  serveTo(String name){
		logger.info("Waiter serve to" + name + "...");
	}

	@Override
	public void setSelfProxy(Object object) {
		this.waiter2 = Waiter2.class.cast(object);
	}
}
